import ctypes

prl = ctypes.cdll.LoadLibrary('libprl.dylib')

print prl.chop
print prl.chomp
print prl.match

prl.chop.restype = ctypes.c_char

s = ctypes.c_buffer('Hello World!\n')
print "Original string is", s.value

print "chomp() = ", prl.chomp(s)
print s.value

print "chomp() = " , prl.chomp(s)
print s.value

print "chop() = ", prl.chop(s)
print s.value

print "match world = ", prl.match(s, "world", 0)
print "match world (ignore case) = ", prl.match(s, "world", 1)
